<?php

use App\Home\Controllers as C;
use Illuminate\Support\Facades\Route;

// 处理微信的请求消息
Route::any('/serve', [C\WeChatController::class, 'serve']);

Route::get('/search/hot', [C\ListeningController::class, 'search_hot']);

Route::get('/playlist/detail/{id}', [C\ListeningController::class, 'playlist_detail']);

Route::get('lyric/{id}', [C\ListeningController::class, 'lyric']);

Route::get('spectrum/{id}', [C\ListeningController::class, 'spectrum']);

Route::get('personalized', [C\ListeningController::class, 'personalized']);

Route::get('search', [C\ListeningController::class, 'search']);

Route::get('song/detail/{ids}', [C\ListeningController::class, 'detail']);

Route::prefix('home-api')
    ->middleware('home')
    ->group(function () {
        Route::middleware([
            'home.auth'
        ])->group(function () {
            Route::get('/user', [C\WeChatController::class, 'user']);
        });
    });
    
Route::resource('worship-artists', C\WorshipArtistController::class);
Route::resource('worship-albums', C\WorshipAlbumController::class);